{%include file="m.index.header.tpl.php"%}
<!--主体部分-->
<div class="container" style="margin-top:70px;">

    <div class="row" style="margin-top:10px;">
        <div class="col-xs-4 text-center grade"> <a type="button"  href="index.php?a=classstudent.info">活动</a> </div>
        <div class="col-xs-4 text-center past_grade"> <a type="button"  href="index.php?a=classstudent.info&type=1">同学</a> </div>
        <div class="col-xs-4 text-center  keren"> <a type="button"  href="index.php?a=classstudent.info&type=2">科任</a> </div>
    </div><!--row-->



    <div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;" id="school_notice">

        <table class="table">
            {%if $activitys_lists %}
            {%foreach from=$activitys_lists item=value%}
            <tr><td>{%$value.create_time%}</td></tr>
            <tr><td class="school-notice_td"><a href="index.php?a=activitys.classdetails&activitys_id={%$value.activitys_id%}">{%$value.activitys_title%}</a></td></tr>
            <tr><td><hr></td></tr>
            {%/foreach%}
            {%/if%}

            {%if $student_lists %}
            <tr class="student_th"><td>号</td><td>姓名</td></tr>
            {%foreach from=$student_lists item=value%}
            <tr><td>{%$value.student_no%}</td><td>{%$value.student_name%}</td>
            {%/foreach%}
            {%/if%}

            {%if $teacher_lists %}
            <tr> <td>班主任</td><td>{%$name%}</td></tr>
            {%foreach from=$teacher_lists item=value%}

            <tr><td>{%$value.subject_name%}:</td><td>{%$value.staff_name%}</td></tr>
            {%/foreach%}
            {%/if%}
        </table>




    </div>





</div>
<!--container  end--> 
<!--主体部分  end--> 
<!--底部-->
{%include file="m.index.footer.tpl.php"%} 
<script type="text/javascript">
        $(document).ready(function () {
            $("#grade_id").change(function () {		
                if ($(this).val() == "-1") {
					$("#industr").remove(); return; 
					}
                else {
			var timestamp = new Date().getTime();
			$.ajax({
			url:"index.php?a=student.gradelistjson",
			type:"get",
			data: "grade_id=" + $("#grade_id").find("option:selected").val() + "&timestamp=" + timestamp,
			dataType:"json",
			success:function(msg){
			   
                            //实例2个字符串变量来拼接下拉列表
                            var industr = "";
                            //使用jquery解析json中的数据
                            $.each(msg, function (n, value) {
                                industr += ("<option value=\"" + value.class_id + "\">" + value.class_name);
                                industr += ("</option>");
                            });

                            $("#class_id").html(industr);			   			   
			}
			});					

                }

            });

        });
</script>